<template>
  <div>
    <component :is="currentComponent"  :outboundOrderNo=outboundOrderNo :wmsOutbound=editData @goNextAdd="add" @goNextEdit="edit" @handleCancel="handleCancel" ref="childComponent" />
  </div>
</template>

<script>
import List from "./list"
import AddWmsOutbound from "./addWmsOutbound.vue"
import EditWmsOutbound from "./editWmsOutbound.vue"

export default {
  name: "Index",
  components: {List,AddWmsOutbound,EditWmsOutbound},
  data() {
    return {
      currentComponent:"List",
      outboundOrderNo:"",
      editData:{},
    }
  },
  created() {
  },
  methods: {
    add(outboundOrderNo){
      this.outboundOrderNo=outboundOrderNo;
      this.currentComponent = "AddWmsOutbound";
    },
    //修改
    edit(editData){
      console.log("editData",editData)
      this.editData=editData;
      this.currentComponent = "EditWmsOutbound";
    },
    handleCancel(){
      this.currentComponent = "List"
    }
  }
}
</script>
<style>

</style>
